﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Web;
using CSharpDesign.DAL;

namespace CSharpDesign.BLL
{
    public class ModifyPwdService
    {
        SqlHelper mydata = new SqlHelper();
        
        public void UpdatePwd(string Username, string txtpwd2)
        {
            string sql = "update [Admin]  set [Apwd] ='" + txtpwd2 + "' where [id]='" + Username + "' ";
            mydata.RunSql(sql);
        }

        public SqlDataReader CheckPwd(string adminId, string txtpwd1)
        {
            return mydata.GetDataReader("select * from  Admin  where id='" + adminId + "' and Apwd='" + txtpwd1 + "'");
        }
    }
}